﻿#pragma once

#include "ComponentBase.h"

class Robot;

class AlarmLight : public ComponentBase
{
	Q_OBJECT

public:
	AlarmLight(QObject *parent);
	~AlarmLight();

	// 组件初始化处理函数
	virtual int ComponentInit() override;
	/*自检接口*/
	virtual bool ComponentCheckSelfState() override;
	/*复位接口*/
	virtual bool ComponentSelfReset() override;

	virtual void ResponseSystemState(int state) override;

private:
	void SetRedLight();
	void SetYellowLight();
	void SetGreenLight();

private:
	int m_red = -1;
	int m_yellow = -1;
	int m_green = -1;
	Robot* m_rob = nullptr;
};
